package cn.pomelo.secondskill.model;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

@Data
public class Orders implements Serializable {
    /**
     * 订单编号
     */
    private String id;

    /**
     * 商品编号
     */
    private Integer goodsNumber;

    /**
     * 用户编号
     */
    private Integer userId;

    private Goods goods;

    private Address address;

    private String username;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date createDate;

    /**
     * 支付金额
     */
    private BigDecimal payMoney;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date payTime;

    /**
     * 订单状态 0 未支付 1 已支付 2 订单失效 3 加入购物车
     */
    private Integer state;

    /**
     * 订单地址
     */
    private Integer addressId;

    @Serial
    private static final long serialVersionUID = 1L;
}